package abacab.ref;

/**
 * An extension that enables the search for actors
 */
public interface ActorLocator {
	/**
	 * Find an actor for a particular path. All implementation should have a way of being sure the path is theirs to take care of. Afterwards, they have the right
	 * to throw an {@link IllegalArgumentException} if the path is invalid.
	 * 
	 * @param path
	 *          the path
	 * @return an actor reference if found or NULL
	 * @throws IllegalArgumentException
	 *           if the path is not valid
	 */
	<M> ActorRef<M> locateActor(String path) throws IllegalArgumentException;
}